import Vue from 'vue'
import VueRouter from 'vue-router'
import index from '../pages/index'
import login from '../pages/login/login'
import UserManage from '../pages/UserManage/UserManage'
import teacherList from '../pages/UserManage/teacherList.vue'
import CheckRights from '../pages/CheckRights/CheckRights'
import changePersonInfo from "../pages/changePersonInfo.vue";
import changeRecommand from '../pages/changeRecommand.vue'
import recommandList from "../pages/recommandList.vue";
Vue.use(VueRouter)

const routes = [{
        path: '/',
        name: 'login',
        component: login,
        meta: {
            keepAlive: false
        }
    },
    {
        path: '/index',
        name: 'index',
        component: index,
        meta: {
            keepAlive: true
        }
    },
    {
        path: '/changeinfo',
        name: 'changePersonInfo',
        component: changePersonInfo,
        meta: {
            keepAlive: true
        }
    },
    {
        path: '/changeRecommand',
        name: 'changeRecommand',
        component: changeRecommand,
        meta: {
            keepAlive: true
        }
    },
    {
        path: '/recommandList',
        name: 'recommandList',
        component: recommandList,
        meta: {
            keepAlive: true
        }
    },
    {
        path: '/UserManage',
        name: 'UserManage',
        component: UserManage,
        meta: {
            keepAlive: true
        }
    },
    {
        path: '/teacherList',
        name: 'teacherList',
        component: teacherList,
        meta: {
            keepAlive: true
        }
    },
    {
        path: '/CheckRights',
        name: 'CheckRights',
        component: CheckRights,
        meta: {
            keepAlive: true
        }
    },
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router